package araujoCoronelVillamayor.plantasVsZombies.domain;

import araujoCoronelVillamayor.plantasVsZombies.domain.Planta;
import com.google.common.base.Objects;
import java.io.Serializable;

@SuppressWarnings("all")
public class FactoryPlantas implements Serializable {
  private static int plantaNumero;
  
  private static FactoryPlantas factoryPlantasUnica;
  
  private FactoryPlantas() {
    FactoryPlantas.plantaNumero = 0;
  }
  
  public static FactoryPlantas getInstance() {
    FactoryPlantas _xblockexpression = null;
    {
      boolean _equals = Objects.equal(FactoryPlantas.factoryPlantasUnica, null);
      if (_equals) {
        FactoryPlantas _factoryPlantas = new FactoryPlantas();
        FactoryPlantas.factoryPlantasUnica = _factoryPlantas;
      }
      _xblockexpression = (FactoryPlantas.factoryPlantasUnica);
    }
    return _xblockexpression;
  }
  
  public Planta crearShooter() {
    Planta _xblockexpression = null;
    {
      this.incrementarPlantaNumero();
      String _plus = ("Planta Shooter (#" + Integer.valueOf(FactoryPlantas.plantaNumero));
      String _plus_1 = (_plus + ")");
      Planta _planta = new Planta(_plus_1, 4, 2, "Acuatica");
      _xblockexpression = (_planta);
    }
    return _xblockexpression;
  }
  
  public Planta crearGirasol() {
    Planta _xblockexpression = null;
    {
      this.incrementarPlantaNumero();
      String _plus = ("Planta Girasol (#" + Integer.valueOf(FactoryPlantas.plantaNumero));
      String _plus_1 = (_plus + ")");
      Planta _planta = new Planta(_plus_1, 1, 5, "Terrestre");
      _xblockexpression = (_planta);
    }
    return _xblockexpression;
  }
  
  public Planta crearPirana() {
    Planta _xblockexpression = null;
    {
      this.incrementarPlantaNumero();
      String _plus = ("Planta Pirana (#" + Integer.valueOf(FactoryPlantas.plantaNumero));
      String _plus_1 = (_plus + ")");
      Planta _planta = new Planta(_plus_1, 5, 1, "Terrestre");
      _xblockexpression = (_planta);
    }
    return _xblockexpression;
  }
  
  public int incrementarPlantaNumero() {
    int _plus = (FactoryPlantas.plantaNumero + 1);
    int _plantaNumero = FactoryPlantas.plantaNumero = _plus;
    return _plantaNumero;
  }
}
